﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<CRM.Database.Model.TechnicRequestStatuses>>" %>
<%--<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<CRM.Models.TechnicRequestStatuses>>" %>--%>
<%@ Import Namespace="CRM.Resourses" %>

<% Html.DevExpress().GridView(settings =>
                    {
                        settings.Name = "gdTechnicRequestStatuses";
                        settings.KeyFieldName = "IdTechnicRequestStatus";
                        settings.CallbackRouteValues =
                            new { Controller = "TD", Action = "TechnicRequestStatusesPartial" };
                        settings.SettingsPager.PageSize = 20;

                        settings.Columns.Add(column =>
                        {
                            column.Caption = "Id";
                            column.FieldName = "IdTechnicRequestStatus";
                            column.ReadOnly = true;
                        });

                        settings.Columns.Add(column =>
                        {
                            column.Caption = Resourses.NameEn;
                            column.FieldName = "NameEn";
                        });

                        settings.Columns.Add(column =>
                        {
                            column.Caption = Resourses.NameRu;
                            column.FieldName = "NameRu";
                        });

                        settings.Columns.Add(column =>
                        {
                            column.Caption = Resourses.DescriptionRu;
                            column.FieldName = "DescriptionRu";
                        });

                        settings.Columns.Add(column =>
                        {
                            column.Caption = Resourses.DescriptionEn;
                            column.FieldName = "DescriptionEn";
                        });
                        
                    }).Bind(Model).GetHtml();%>